package com.css.zfzx.fwsjcj.modules.taskmanage.taskfrom.service;

import com.alibaba.fastjson.JSONObject;
import com.css.zfzx.fwsjcj.modules.quality.vo.QualityVo;
import com.css.zfzx.fwsjcj.modules.structure.vo.CheckVo;
import com.css.zfzx.fwsjcj.modules.taskmanage.task.entity.FwTaskEntity;
import com.css.zfzx.fwsjcj.modules.taskmanage.taskfrom.entity.*;
import com.css.zfzx.fwsjcj.modules.taskmanage.taskfrom.vo.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;


public interface TaskFromService {

    void saveForm(FwFormEntity fwFormEntity);

    JSONObject findAll(HttpServletRequest request, TaskFormQueryVO taskFormQueryVO, int curPage, int pageSize);

    void subAll(List<String> ids, String spType);

    void deletAll(List<String> ids);

    List<FwFormEntity> findById(List<String> ids);

    FwFormEntity findByFormId(String formId);

    void updForm(FwFormEntity fwFormEntity);

    List<FwFormEntity> queryAll(HttpServletRequest request);

    Long findByUserIdCount(String userId);

    JSONObject findPage(HttpServletRequest request, TaskFormPCQueryVo taskFormPCQueryVo, int curPage, int pageSize);

    void spForm(SpFormVO spFormVO);

    void spAllFrom(String ids, String type, String reason);

    List<FwFormEntity> findByAddress(String province, String city,String area);

    /**
     * 普查质检分页（查询一个任务下的普查列表）
     */
    JSONObject findPage(QualityVo qualityVo, int curPage, int pageSize);

    /**
     * 根据任务ID获取普查主表list
     *
     * @param id
     * @return
     */
    List<FwFormEntity> findByTaskId(String id);

    //根据建筑名称模糊查
    List<FwFormEntity> buildingByBuilding(String buildingName);

    /**
     * 根据类型导出
     */
    void export(TaskFormPCQueryVo taskFormPCQueryVo, HttpServletResponse response);

    /**
     * 普查类型下数据是否为空
     */
    Boolean isEmpty(TaskFormPCQueryVo taskFormPCQueryVo);

    /**
     * 总概括标题数据
     */
    GeneralVo generalTitle();

    List<GeneralVo> listGeneral(GeneralQueryVo generalQueryVo);

    List<GeneralVo> listCityGeneral(GeneralQueryVo generalQueryVo);

    JSONObject proviceChart(GeneralQueryVo generalQueryVo);

    JSONObject cityChart(GeneralQueryVo generalQueryVo);

    JSONObject userDivision();

    List<String> listFormByType(String type, String startDate, String endDate, String province);

    /**
     * 导出图片URL集合
     *
     * @return
     */
    List<String> listImagesByType(String type, String startDate, String endDate, String province);

    String importTask(MultipartFile file, String category, String taskName, String taskId);

    String getDivisionCode(String buildingArea);

    Map<String,Object> getUserInfo(String userCode);

    List<String> uploadBase64(String[] base64Info, String buildingCode) throws IOException;

    Object getChild(String id);

    void back(String id, CheckVo checkVo);

    void spFwCityForm(FwCtiyHouseEntity fwCtiyHouseEntity);

    void spFwNoCityForm(FwNoctiyHouseEntity noctiyHouseEntity);

    void spFwVillageForm(FwVillageHouseEntity villageHouseEntity);

    void spFwVillagePubForm(FwVillagePubhouseEntity villagePubhouseEntity);

    void batchBack(String id, CheckVo checkVo);

    List<FwFormEntity> findAllCountry();
}
